'''
Created on 2015-8-24

@author: admin
'''

import sys
sys.path.append("../common")
import PageAnaly

class Master():
    
    def __init__(self):
        self.file="";
        self.stockDict={}
    def setFile(self,file):
        self.file=file;
    def process(self):
        
        for line in open(self.file):
            #print "stock:%s"%line.strip()
            pageAnaly = PageAnaly.PageAnaly();
            pageAnaly.setStockCode(line.strip());
            list=pageAnaly.getStockHolderList();
            self.stockDict[line.strip()]=list;
            list=[];
        return self.stockDict;
            
if __name__ == '__main__':
    
       master = Master();         
       master.setFile("../../../../../../conf/stockList.txt");
       dict={};
       dict=master.process();
       #print dict["sh600030"][0]
       for (stockCode,stockHolder) in dict.items():
           for i in range(len(stockHolder)):
               print "key:%s  value:%s"%(stockCode,stockHolder[i])